package cn.jzq.demo.service.impl;

import cn.jzq.demo.entity.GeneralClass;
import cn.jzq.demo.mapper.GeneralClassMapper;
import cn.jzq.demo.service.IGeneralClassService;
import cn.jzq.demo.service.IGeneralStudentService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class GeneralClassServiceImpl extends ServiceImpl<GeneralClassMapper, GeneralClass> implements IGeneralClassService {
    @Autowired
    private GeneralClassMapper classMapper;

    @Override
    @Cacheable(value = "test_class", key = "#id + '_class'")
    public GeneralClass getById(Integer id) {
        return classMapper.selectById(id);
    }
}
